package com.jeesite.modules.remind.web;

import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.DateUtils;
import com.jeesite.modules.remind.entity.*;
import com.jeesite.modules.remind.service.RemindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Controller
@RequestMapping(value = "${adminPath}/remind/Remind")
public class RemindController {

    @Autowired
    private RemindService remindService;

    /**
     * 客户提醒查询条数
     */
    @RequestMapping(value = {"customerRemindCounts", ""})
    @ResponseBody
    public Integer customerRemindCounts() {
        TcustomerRemind tcustomerRemind = new TcustomerRemind();
        String datestr = DateUtils.getDate();
        tcustomerRemind.setRemindDate(datestr);
        return remindService.getCustomerRemindCounts(tcustomerRemind);
    }

    /**
     * 客户提醒查询列表
     */
    @RequestMapping(value = {"customerRemindListData", ""})
    @ResponseBody
    public List < TcustomerRemind > customerRemindListData(TcustomerRemind tcustomerRemind, HttpServletRequest request, HttpServletResponse response) {
        String datestr = DateUtils.getDate();
        tcustomerRemind.setRemindDate(datestr);
        return remindService.getCustomerRemindList(tcustomerRemind);
    }

    /**
     * 客户提醒详情页面
     */
    @RequestMapping(value = {"TcustomerRemindList", ""})
    public String customerRemindList(TcustomerRemind tcustomerRemind, Model model) {
        model.addAttribute("TcustomerRemind", tcustomerRemind);
        return "modules/remind/Remind/TcustomerRemindList";
    }

    /**
     * 缴税提醒查询条数
     */
    @RequestMapping(value = {"customsDeclaredRemindCounts", ""})
    @ResponseBody
    public Integer customsDeclaredRemindCounts() {
        CustomsDeclarationRemind customsDeclarationRemind = new CustomsDeclarationRemind();
        String datestr = DateUtils.getDate();
        customsDeclarationRemind.setRemindDate(datestr);
        return remindService.getCustomsDeclaredRemindCounts(customsDeclarationRemind);
    }

    /**
     * 缴税提醒查询列表
     */
    @RequestMapping(value = {"customsDeclaredRemindListData", ""})
    @ResponseBody
    public Page <CustomsDeclarationRemind> customsDeclaredRemindListData(CustomsDeclarationRemind customsDeclarationRemind, HttpServletRequest request, HttpServletResponse response) {
        customsDeclarationRemind.setPage(new Page <>(request, response));
        String datestr = DateUtils.getDate();
        customsDeclarationRemind.setRemindDate(datestr);
        Page<CustomsDeclarationRemind> page = remindService.getCustomsDeclaredRemindListData(customsDeclarationRemind);
        return page;
    }

    /**
     * 缴税提醒详情页面
     */
    @RequestMapping(value = {"customsDeclaredRemindList", ""})
    public String customsDeclaredRemindList(CustomsDeclarationRemind customsDeclarationRemind, Model model) {
        model.addAttribute("customsDeclarationRemind", customsDeclarationRemind);
        return "modules/remind/Remind/customsDeclarationRemindList";
    }

    /**
     * 融资服务订单提醒查询条数
     */
    @RequestMapping(value = {"finServiceOrderRemindCounts", ""})
    @ResponseBody
    public Integer finServiceOrderRemindCounts() {
        FinServiceOrderRemind finServiceOrderRemind = new FinServiceOrderRemind();
        String datestr = DateUtils.getDate();
        finServiceOrderRemind.setRemindDate(datestr);
        return remindService.finServiceOrderRemindCounts(finServiceOrderRemind);
    }

    /**
     * 融资服务订单提醒查询列表
     */
    @RequestMapping(value = {"finServiceOrderRemindListData", ""})
    @ResponseBody
    public Page <FinServiceOrderRemind> finServiceOrderRemindListData(FinServiceOrderRemind finServiceOrderRemind, HttpServletRequest request, HttpServletResponse response) {
        finServiceOrderRemind.setPage(new Page <>(request, response));
        String datestr = DateUtils.getDate();
        finServiceOrderRemind.setRemindDate(datestr);
        Page<FinServiceOrderRemind> page = remindService.getFinServiceOrderRemindList(finServiceOrderRemind);
        return page;
    }

    /**
     * 融资服务订单提醒详情页面
     */
    @RequestMapping(value = {"finServiceOrderRemindList", ""})
    public String finServiceOrderRemindList(FinServiceOrderRemind finServiceOrderRemind, Model model) {
        model.addAttribute("finServiceOrderRemind", finServiceOrderRemind);
        return "modules/remind/Remind/finServiceOrderRemindList";
    }


    /**
     * 服务订单未开证提醒查询条数
     */
    @RequestMapping(value = {"serviceOrderRemindCounts", ""})
    @ResponseBody
    public Integer serviceOrderRemindCounts() {
        ServiceOrderRemind serviceOrderRemind = new ServiceOrderRemind();
        String datestr = DateUtils.getDate();
        serviceOrderRemind.setRemindDate(datestr);
        return remindService.serviceOrderRemindCounts(serviceOrderRemind);
    }

    /**
     * 服务订单未开证提醒查询列表
     */
    @RequestMapping(value = {"serviceOrderRemindListData", ""})
    @ResponseBody
    public Page <ServiceOrderRemind> serviceOrderRemindListData(ServiceOrderRemind serviceOrderRemind, HttpServletRequest request, HttpServletResponse response) {
        serviceOrderRemind.setPage(new Page <>(request, response));
        String datestr = DateUtils.getDate();
        serviceOrderRemind.setRemindDate(datestr);
        Page<ServiceOrderRemind> page = remindService.getServiceOrderRemindList(serviceOrderRemind);
        return page;
    }

    /**
     * 服务订单未开证提醒详情页面
     */
    @RequestMapping(value = {"serviceOrderRemindList", ""})
    public String serviceOrderRemindList(ServiceOrderRemind serviceOrderRemind, Model model) {
        model.addAttribute("serviceOrderRemind", serviceOrderRemind);
        return "modules/remind/Remind/serviceOrderRemindList";
    }

    /**
     * 开证未到单条数
     */
    @RequestMapping(value = {"letterCreditRemindCounts", ""})
    @ResponseBody
    public Integer letterCreditRemindCounts() {
        return remindService.getLetterCreditRemindCounts();
    }

    /**
     * 开证未到单查询列表
     */
    @RequestMapping(value = {"letterCreditRemindListData", ""})
    @ResponseBody
    public List <LetterCreditRemind> letterCreditRemindListData(HttpServletRequest request, HttpServletResponse response) {

        return remindService.getLetterCreditRemindList();
    }
    /**
     * 开证未到单查询页面
     */
    @RequestMapping(value = {"letterCreditRemindList", ""})
    public String letterCreditRemindList(LetterCreditRemind letterCreditRemind, Model model) {
        model.addAttribute("letterCreditRemind", letterCreditRemind);
        return "modules/remind/Remind/letterCreditRemindList";
    }
    /**
     * 已开证未预投保提醒条数
     */
    @RequestMapping(value = {"letterCreditNoRemindCounts", ""})
    @ResponseBody
    public Integer letterCreditNoRemindCounts() {
        return remindService.getLetterCreditNoRemindCounts();
    }

    /**
     * 已开证未预投保提醒列表
     */
    @RequestMapping(value = {"letterCreditNoRemindListData", ""})
    @ResponseBody
    public List <LetterCreditNoRemind> letterCreditNoRemindListData(HttpServletRequest request, HttpServletResponse response) {

        return remindService.getLetterCreditNoRemindList();
    }
    /**
     * 已开证未预投保提醒页面
     */
    @RequestMapping(value = {"letterCreditNoRemindList", ""})
    public String letterCreditNoRemindList(LetterCreditNoRemind letterCreditNoRemind, Model model) {
        model.addAttribute("letterCreditNoRemind", letterCreditNoRemind);
        return "modules/remind/Remind/letterCreditNoRemindList";
    }



    /**
     * 已到单未正式投保提醒条数
     */
    @RequestMapping(value = {"ladingBillRemindCounts", ""})
    @ResponseBody
    public Integer ladingBillRemindCounts() {
        return remindService.getLadingBillRemindCounts();
    }

    /**
     * 已到单未正式投保提醒列表
     */
    @RequestMapping(value = {"ladingBillRemindListData", ""})
    @ResponseBody
    public List <LadingBillRemind> ladingBillRemindListData(HttpServletRequest request, HttpServletResponse response) {

        return remindService.getLadingBillRemindList();
    }
    /**
     * 已到单未正式投保提醒页面
     */
    @RequestMapping(value = {"ladingBillRemindList", ""})
    public String ladingBillRemindList(LadingBillRemind ladingBillRemind, Model model) {
        model.addAttribute("ladingBillRemind", ladingBillRemind);
        return "modules/remind/Remind/ladingBillRemindList";
    }

    /**
     * 供应商资料到期提醒页面
     */
    @RequestMapping(value = {"supplierBusinessReminderList", ""})
    public String supplierBusinessReminderList(SupplierBusinessReminder supplierBusinessReminder, Model model) {
        model.addAttribute("supplierBusinessReminder", supplierBusinessReminder);
        return "modules/remind/Remind/supplierBusinessReminderList";
    }
    /**
     * 供应商资料到期提醒列表
     */
    @RequestMapping(value = {"supplierBusinessReminderListData", ""})
    @ResponseBody
    public Page<SupplierBusinessReminder> supplierBusinessReminderListData(SupplierBusinessReminder supplierBusinessReminder,HttpServletRequest request, HttpServletResponse response) {
        supplierBusinessReminder.setPage(new Page<>(request,response));
        return remindService.getsupplierBusinessReminder(supplierBusinessReminder);
    }

    /**
     * 供应商资料到期提醒页面
     */
    @RequestMapping(value = {"supplyChainServiceAgreementrRemindList", ""})
    public String supplyChainServiceAgreementrRemindList(SupplyChainServiceAgreementrRemind supplyChainServiceAgreementrRemind, Model model) {
        model.addAttribute("supplyChainServiceAgreementrRemind", supplyChainServiceAgreementrRemind);
        return "modules/remind/Remind/supplierChainServiceAgreementList";
    }
    /**
     * 供应商资料到期提醒列表
     */
    @RequestMapping(value = {"supplyChainServiceAgreementrRemindListData", ""})
    @ResponseBody
    public Page <SupplyChainServiceAgreementrRemind> supplyChainServiceAgreementrRemindListData(
            SupplyChainServiceAgreementrRemind supplyChainServiceAgreementrRemind,
            HttpServletRequest request, HttpServletResponse response) {
   supplyChainServiceAgreementrRemind.setPage(new Page<>(request,response));
        return remindService.getSupplyChainServiceAgreementrRemindList(supplyChainServiceAgreementrRemind);
    }

    /**
     * 年度汽车销售协议到期提醒页面
     */
    @RequestMapping(value = {"yearCarSalePurchaseAgreementRemindList", ""})
    public String yearCarSalePurchaseAgreementRemindList(YearCarSalePurchaseAgreementRemind yearCarSalePurchaseAgreementRemind, Model model) {
        model.addAttribute("yearCarSalePurchaseAgreementRemind", yearCarSalePurchaseAgreementRemind);
        return "modules/remind/Remind/yearCarSalePurchaseAgreementRemind";
    }
    /**
     * 年度汽车销售协议到期提醒列表
     */
    @RequestMapping(value = {"yearCarSalePurchaseAgreementRemindListData", ""})
    @ResponseBody
    public Page <YearCarSalePurchaseAgreementRemind> yearCarSalePurchaseAgreementRemindListData(
            YearCarSalePurchaseAgreementRemind yearCarSalePurchaseAgreementRemind,
            HttpServletRequest request, HttpServletResponse response) {
        yearCarSalePurchaseAgreementRemind.setPage(new Page<>(request,response));
        return remindService.getYearCarSalePurchaseAgreementRemindList(yearCarSalePurchaseAgreementRemind);
    }

    /**
     * 到单押汇到期提醒页面
     */
    @RequestMapping(value = {"billNegotiatedRemindList", ""})
    public String billNegotiatedRemindList(BillNegotiatedRemind billNegotiatedRemind, Model model) {
        model.addAttribute("billNegotiatedRemind", billNegotiatedRemind);
        return "modules/remind/Remind/billNegotiatedRemind";
    }
    /**
     * 到单押汇到期提醒列表
     */
    @RequestMapping(value = {"billNegotiatedRemindListData", ""})
    @ResponseBody
    public Page <BillNegotiatedRemind> billNegotiatedRemindListData(BillNegotiatedRemind billNegotiatedRemind,HttpServletRequest request, HttpServletResponse response) {
        billNegotiatedRemind.setPage(new Page<>(request,response));
        return remindService.getBillNegotiatedRemindList(billNegotiatedRemind);
    }

    /**
     * 通关缴税到期提醒页面
     */
    @RequestMapping(value = {"taxClearanceRemindList", ""})
    public String taxClearanceRemindList(TaxClearanceRemind taxClearanceRemind, Model model) {
        model.addAttribute("taxClearanceRemind", taxClearanceRemind);
        return "modules/remind/Remind/taxClearanceRemind";
    }
    /**
     * 通关缴税到期提醒列表
     */
    @RequestMapping(value = {"taxClearanceRemindListData", ""})
    @ResponseBody
    public Page <TaxClearanceRemind> taxClearanceRemindListData(TaxClearanceRemind taxClearanceRemind,HttpServletRequest request, HttpServletResponse response) {
taxClearanceRemind.setPage(new Page<>(request,response));
        return remindService.getTaxClearanceRemindList(taxClearanceRemind);
    }

    /**
     * 放车提醒查询列表
     */
    @RequestMapping(value = {"releaseCarRemindListData", ""})
    @ResponseBody
    public Page <ReleaseCarRemind> releaseCarRemindListData(ReleaseCarRemind  releaseCarRemind, HttpServletRequest request, HttpServletResponse response) {
        releaseCarRemind.setPage(new Page <>(request, response));

        Page<ReleaseCarRemind> page = remindService.getReleaseCarRemindListData(releaseCarRemind);
        return page;
    }

    /**
     * 放车提醒详情页面
     */
    @RequestMapping(value = {"releaseCarRemindList", ""})
    public String releaseCarRemindList(ReleaseCarRemind  releaseCarRemind, Model model) {
        model.addAttribute("releaseCarRemind", releaseCarRemind);
        return "modules/remind/Remind/releaseCarRemindList";
    }

    /**
     * 到单提醒查询列表
     */
    @RequestMapping(value = {"arrivalReminderAgreementListData", ""})
    @ResponseBody
    public Page <ArrivalReminderAgreement> arrivalReminderAgreementListData(ArrivalReminderAgreement  arrivalReminderAgreement, HttpServletRequest request, HttpServletResponse response) {
        arrivalReminderAgreement.setPage(new Page <>(request, response));

        Page<ArrivalReminderAgreement> page = remindService.getArrivalReminderAgreementListData(arrivalReminderAgreement);
        return page;
    }

    /**
     * 应收提醒详情页面
     */
    @RequestMapping(value = {"arrivalReminderAgreementList", ""})
    public String arRemindList(ArrivalReminderAgreement arrivalReminderAgreement, Model model) {
        model.addAttribute("ArrivalReminderAgreement", arrivalReminderAgreement);
        return "modules/remind/Remind/arrivalReminderAgreementList";
    }
    /**
     * 到单提醒查询列表
     */
    @RequestMapping(value = {"arRemindListData", ""})
    @ResponseBody
    public Page <ArRemindAgreeMent> arRemindListData(ArRemindAgreeMent arRemindAgreeMent, HttpServletRequest request, HttpServletResponse response) {
        arRemindAgreeMent.setPage(new Page <>(request, response));

        Page<ArRemindAgreeMent> page = remindService.getArRemindListData(arRemindAgreeMent);
        return page;
    }

    /**
     * 到单提醒详情页面
     */
    @RequestMapping(value = {"arRemindList", ""})
    public String arrivalReminderAgreementList(ArRemindAgreeMent arRemindAgreeMent, Model model) {
        model.addAttribute("arRemindAgreeMent", arRemindAgreeMent);
        return "modules/remind/Remind/arRemindList";
    }
    /**
     * 完结提醒查询列表
     */
    @RequestMapping(value = {"logisticsendRemindListData", ""})
    @ResponseBody
    public Page <LogisticsendRemind> logisticsendRemindListData(LogisticsendRemind logisticsendRemind, HttpServletRequest request, HttpServletResponse response) {
        logisticsendRemind.setPage(new Page <>(request, response));

        Page<LogisticsendRemind> page = remindService.getLogisticsendRemindListData(logisticsendRemind);
        return page;
    }

    /**
     * 完结提醒详情页面
     */
    @RequestMapping(value = {"logisticsendRemindList", ""})
    public String logisticsendRemindList(LogisticsendRemind logisticsendRemind, Model model) {
        model.addAttribute("logisticsendRemind", logisticsendRemind);
        return "modules/remind/Remind/logisticsendRemindList";
    }

    /**
     * 到单提醒详情页面
     */
    @RequestMapping(value = {"repaymentunpaidRemindList", ""})
    public String repaymentunpaidRemindList(RepaymentunpaidRemind repaymentunpaidRemind, Model model) {
        model.addAttribute("repaymentunpaidRemind", repaymentunpaidRemind);
        return "modules/remind/Remind/customerCarContractRemind.html";
    }
    /**
     * 完结提醒查询列表
     */
    @RequestMapping(value = {"repaymentunpaidRemindListData", ""})
    @ResponseBody
    public Page <RepaymentunpaidRemind> repaymentunpaidRemindListData(RepaymentunpaidRemind repaymentunpaidRemind, HttpServletRequest request, HttpServletResponse response) {
        repaymentunpaidRemind.setPage(new Page <>(request, response));
        Page<RepaymentunpaidRemind> page = remindService.getRepaymentunpaidRemindListData(repaymentunpaidRemind);
        return page;
    }

    /**
     * 海外仓提醒查询列表
     */
    @RequestMapping(value = {"overseasWarehouseRemindListData", ""})
    @ResponseBody
    public Page <OverseasWarehouseRemind> overseasWarehouseRemindListData(OverseasWarehouseRemind overseasWarehouseRemind, HttpServletRequest request, HttpServletResponse response) {
        overseasWarehouseRemind.setPage(new Page <>(request, response));

        Page<OverseasWarehouseRemind> page = remindService.getOverseasWarehouseRemindListData(overseasWarehouseRemind);
        return page;
    }

    /**
     * 海外仓提醒详情页面
     */
    @RequestMapping(value = {"overseasWarehouseRemindList", ""})
    public String overseasWarehouseRemindList(OverseasWarehouseRemind overseasWarehouseRemind, Model model) {
        model.addAttribute("overseasWarehouseRemind", overseasWarehouseRemind);
        return "modules/remind/Remind/overseasWarehouseRemindList";
    }

    /**
     * 已到单未申请许可证提醒查询列表
     */
    @RequestMapping(value = {"ladingBillNoPermitRemindListData", ""})
    @ResponseBody
    public Page <LadingBillNoPermitRemind> ladingBillNoPermitRemindListData(LadingBillNoPermitRemind ladingBillNoPermitRemind, HttpServletRequest request, HttpServletResponse response) {
        ladingBillNoPermitRemind.setPage(new Page <>(request, response));

        Page<LadingBillNoPermitRemind> page = remindService.getLadingBillNoPermitRemindListData(ladingBillNoPermitRemind);
        return page;
    }

    /**
     *  已到单未申请许可证提醒详情页面
     */
    @RequestMapping(value = {"ladingBillNoPermitRemindList", ""})
    public String ladingBillNoPermitRemindList(LadingBillNoPermitRemind ladingBillNoPermitRemind, Model model) {
        model.addAttribute("ladingBillNoPermitRemind", ladingBillNoPermitRemind);
        return "modules/remind/Remind/ladingBillNoPermitRemindList";
    }

    /**
     * 已到岗未申报提醒查询列表
     */
    @RequestMapping(value = {"arrivalNoDeclareRemindListData", ""})
    @ResponseBody
    public Page <ArrivalNoDeclareRemind> arrivalNoDeclareRemindListData(ArrivalNoDeclareRemind arrivalNoDeclareRemind, HttpServletRequest request, HttpServletResponse response) {
        arrivalNoDeclareRemind.setPage(new Page <>(request, response));

        Page<ArrivalNoDeclareRemind> page = remindService.getArrivalNoDeclareRemindListData(arrivalNoDeclareRemind);
        return page;
    }

    /**
     *  已到岗未申报提醒详情页面
     */
    @RequestMapping(value = {"arrivalNoDeclareRemindList", ""})
    public String arrivalNoDeclareRemindList(ArrivalNoDeclareRemind arrivalNoDeclareRemind, Model model) {
        model.addAttribute("arrivalNoDeclareRemind", arrivalNoDeclareRemind);
        return "modules/remind/Remind/arrivalNoDeclareRemindList";
    }
}
